﻿namespace DoNet.Platform.RenRen.Model
{
    /// <summary>
    /// 
    /// </summary>
    public class TokenInfo
    {
        /*
        {
            "token_type":"bearer",
            "expires_in":2594408,
            "refresh_token":"268872|0.Bq1QVptzxvs9yWnUA7ICRE7sQMNNCzb1.820897483.1402042721194",
            "user":{
                "id":820897483,
                "name":"林志玲",
                "avatar":[
                    {"type":"avatar","url":"http://head.xiaonei.com/photos/0/0/women_head.gif"},
                    {"type":"tiny","url":"http://head.xiaonei.com/photos/0/0/women_tiny.gif"},
                    {"type":"main","url":"http://head.xiaonei.com/photos/0/0/women_main.gif"},
                    {"type":"large","url":"http://head.xiaonei.com/photos/0/0/women_main.gif"}
                ]
            },
            "access_token":"268872|6.b5d47f3ae3e2c1f99d14e5395b2b3551.2592000.1404637200-820897483"
        }
        */
        /// <summary>
        /// Access token的类型目前只支持bearer  Bearer
        /// </summary>
        public string token_type { set; get; } = string.Empty;
        /// <summary>
        /// 获取到的网页授权接口调用凭证 
        /// </summary>
        public string access_token { set; get; } = string.Empty;
        /// <summary>
        /// Access Token的有效期，以秒为单位
        /// </summary>
        public int expires_in { set; get; }
        /// <summary>
        /// 用于刷新Access Token的Refresh Token，所有应用都会返回该参数**（10年的有效期**）
        /// </summary>
        public string refresh_token { set; get; } = string.Empty;
        /// <summary>
        /// 用户信息
        /// </summary>
        public UserInfo user { set; get; } = new UserInfo();
    }
}
